FROM openjdk:11-jdk
LABEL maintainer=flitsneak

ENV PARAMS="--server.port=8080 --spring.profiles.active=test --spring.cloud.nacos.discovery.server-addr=nacos-svc.digital-collection:8848 --spring.cloud.nacos.config.server-addr=nacos-svc.digital-collection:8848 --spring.cloud.nacos.config.namespace=test --spring.cloud.nacos.config.file-extension=yml --spring.cloud.nacos.config.group=test"
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

COPY target/*.jar /app.jar
EXPOSE 8080

ENTRYPOINT ["/bin/sh","-c","java -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom -jar app.jar ${PARAMS}"]